package _7jvm;

import cn.hutool.core.util.ObjectUtil;

/**
 * @description:
 * @author: wang zhen
 * @create: 2022-06-27 11:25
 */
class Student{
    String name;
    int age;

}
public class EliminateAllocationsTest {

    public static void main(String[] args){
        long start = System.currentTimeMillis();
        for(int i=0;i<10000000;i++){
            test2();
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start+"ms");
    }

    public static void test1(){
        Student student=new Student();
        student.name="AA";
        student.age=3;

        System.out.println("student.name="+student.name+",student.age="+student.age);
    }

    public static void test2(){
        Student student=new Student();
        ObjectUtil.clone(student);
    }
}
